<template>
  <div>
    <div class="container">
      <h3>{{ title }}分类</h3>
<!--     作用域插槽 当数据在组件中时 可以根据插槽在给组件的使用者传数据 -->
      <slot :games="games"></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: "my-category",
  props: ['title'],
  data() {
    return {
      games: ['cs2','cf','lol'],
    }
  }
}
</script>

<style scoped>
.container {
  background-color: skyblue;
  width: 200px;
  height: 300px;
}

h3 {
  background-color: orange;
  text-align: center;
}
</style>